#include "AIInterface.h"

namespace OOInterface {

AIInterface::AIInterface(AIInterfaceImp* _impl)
{
	this->_impl = _impl;
}

AIInterface::~AIInterface()
{
}

void AIInterface::attachAI( AIHandle* handle )
{
	_impl->attachAI( handle );
}

bool AIInterface::orderUnit( ConstUnitPtr unit, ConstCommandPtr command)
{
	return _impl->orderUnit(unit, command);
}

void AIInterface::sendMessage(const std::string& msg, Player* p, bool team)
{
	_impl->sendTextMessage(msg, p, team);
}

bool AIInterface::giveResourcesTo(Player* p, Resource* resource, float amount)
{

	return false;
}

bool AIInterface::giveUnitsTo(Player* p, ConstUnitSet* units)
{

	return false;
}

const ConstPlayerSet& AIInterface::getPlayers()
{

	return _impl->getPlayers();
}

const GameMap& AIInterface::getGameMap()
{
	return _impl->getGameMap();
}

void AIInterface::addGameListener( GameListener* listener)
{
	_impl->addGameListener(listener);
}

void AIInterface::removeGameListener( GameListener* listener)
{
	_impl->removeGameListener(listener);
}

CommandFactory& AIInterface::getCommandFactory()
{
	return _impl->getCommandFactory();
}

const ResourceList& AIInterface::getResourceTypes()
{
	return _impl->getResourceTypes();
}

}
